package cn.edu.zjicm.wordsnet_d.data;

import java.util.ArrayList;

import u.aly.ad;

import cn.edu.zjicm.wordsnet_d.datapersistent.FileManager;

public class VoicePack {
	
	public static final VoicePack basicPack		= new VoicePack("基础词库语音包", 		
																FileManager.BASIC_VOICE_FILE_SUFFIX_NAME, 	
																FileManager.BASIC_VOICE_ZIPFILE_NAME,
																"cet6高频及以下单词语音包，包括初中，中考，高考，cet4、cet6、考研以及新概念1、新概念2 等单词书的单词语音。",	
																16.7,17568102);
	public static final VoicePack advancePack 	= new VoicePack("高级词库语音包", 	
																FileManager.ADVANCE_VOICE_FILE_SUFFIX_NAME,
																FileManager.ADVANCE_VOICE_ZIPFILE_NAME,																
																"除基础包以外的单词语音包，包括雅思、托福、考博核心，专四、专八、新概念3、新概念4等单词书的单词语音。", 	
																26.6,27901855);
//	public static final VoicePack middleSchoolPhrasePack= new VoicePack("中学词组语音包", 	
//																FileManager.MIDDLE_SCHOOL_PHRASE_VOICE_SUFFIX_NAME,
//																FileManager.MIDDLE_SCHOOL_PHRASE_VOICE_ZIPFILE_NAME,																
//																"“中考必备词组”和“高考必备词组”的词组语音包", 	
//																5.0);
	public static final VoicePack wgZKPack= new VoicePack("中考词组语音包", 	
																FileManager.WG_ZK_VOICE_SUFFIX_NAME,
																FileManager.WG_ZK_VOICE_ZIPFILE_NAME,																
																"词汇书“中考词组”的语音", 	
																2.6,2746550);
	public static final VoicePack wgGKPack= new VoicePack("高考词组语音包", 	
																FileManager.WG_GK_VOICE_SUFFIX_NAME,
																FileManager.WG_GK_VOICE_ZIPFILE_NAME,																
																"词汇书“高考词组”的语音", 	
																3.5,3672300);
	public static final VoicePack wgCET4Pack= new VoicePack("四级词组语音包", 	
																FileManager.WG_CET4_VOICE_SUFFIX_NAME,
																FileManager.WG_CET4_VOICE_ZIPFILE_NAME,																
																"词汇书“四级词组”的语音", 	
																3.6,3799538 );
	public static final VoicePack wgKYPack= new VoicePack("考研词组语音包", 	
																FileManager.WG_KY_VOICE_SUFFIX_NAME,
																FileManager.WG_KY_VOICE_ZIPFILE_NAME,																
																"词汇书“考研核心词组”和“考研补充词组”的语音", 	
																6.5,6906159);
	public static final VoicePack wgCET6Pack= new VoicePack("六级词组语音包", 	
																FileManager.WG_CET6_VOICE_SUFFIX_NAME,
																FileManager.WG_CET6_VOICE_ZIPFILE_NAME,																
																"词汇书“六级词组”的语音", 	
																1.9,2090316);
	public static final VoicePack wgIELTSPack= new VoicePack("雅思词组语音包", 	
																FileManager.WG_IELTS_VOICE_SUFFIX_NAME,
																FileManager.WG_IELTS_VOICE_ZIPFILE_NAME,																
																"词汇书“雅思词组”的语音", 	
																5.6,5934848);
	public static final VoicePack wgTOEFLPack= new VoicePack("托福词组语音包", 	
																FileManager.WG_TOEFL_VOICE_SUFFIX_NAME,
																FileManager.WG_TOEFL_VOICE_ZIPFILE_NAME,																
																"词汇书“托福词组”的语音", 	
																6.4,6778751);
	public static final VoicePack wgJuniorPack= new VoicePack("初中教材配套词组语音包", 	
																FileManager.WG_JUNIOR_PT_VOICE_SUFFIX_NAME,
																FileManager.WG_JUNIOR_PT_VOICE_ZIPFILE_NAME,																
																"“初中教材配套”中词汇书所包含的词组的语音", 	
																5.3,5631244);
	public static final VoicePack wgSeniorPack= new VoicePack("高中教材配套词组语音包", 	
																FileManager.WG_SENIOR_PT_VOICE_SUFFIX_NAME,
																FileManager.WG_SENIOR_PT_VOICE_ZIPFILE_NAME,																
																"“高中教材配套”中词汇书所包含的词组的语音", 	
																6.1,6428740);

	
	public static ArrayList<VoicePack> packList = new ArrayList<VoicePack>(){{	
		add(basicPack);	
		add(advancePack);
//		add(middleSchoolPhrasePack);
		add(wgZKPack);
		add(wgGKPack);
		add(wgCET4Pack);
		add(wgKYPack);
		add(wgCET6Pack);
		add(wgIELTSPack);
		add(wgTOEFLPack);
		add(wgJuniorPack);
		add(wgSeniorPack);
	}};
	
	public static VoicePack getVoicePack(String packName){
		if(packName.equals(basicPack.getName()))
			return basicPack;
		
		if(packName.equals(advancePack.getName()))
			return advancePack;
		
		if(packName.equals(wgZKPack.getName()))
			return wgZKPack;
		
		if(packName.equals(wgGKPack.getName()))
			return wgGKPack;
		
		if(packName.equals(wgCET4Pack.getName()))
			return wgCET4Pack;
		
		if(packName.equals(wgKYPack.getName()))
			return wgKYPack;
		
		if(packName.equals(wgCET6Pack.getName()))
			return wgCET6Pack;
		
		if(packName.equals(wgIELTSPack.getName()))
			return wgIELTSPack;
		
		if(packName.equals(wgTOEFLPack.getName()))
			return wgTOEFLPack;
		
		if(packName.equals(wgJuniorPack.getName()))
			return wgJuniorPack;
		
		if(packName.equals(wgSeniorPack.getName()))
			return wgSeniorPack;
		return null;
	}
	
	public static double getVoicePackSize(String packName){
		return getVoicePack(packName).getShowSize();
	}
	
	public static double getVoicePackRealSize(String packName){
		return getVoicePack(packName).getRealSize();
	}
	
//	public static ArrayList<VoicePack> packList = new ArrayList<VoicePack>(){{
//		add(new VoicePack("基础语音包",		FileManager.VOICE_FILE_SUFFIX_NAME,					"语音包1",13.8));
//		add(new VoicePack("托福语音包",		FileManager.TOEFL_VOICE_FILE_SUFFIX_NAME,			"语音包2",2.5));
//		add(new VoicePack("基础+托福语音包",	FileManager.BASIC_AND_TOEFL_VOICE_FILE_SUFFIX_NAME,	"语音包3",16.3));
//	}};

	String name;				//名称
	String fileName;			//本地文件名
	String downloadFileName;	//下载网络文件名
	String description;			//描述
	double showSize;			//显示的大小,单位M
	double realSize;            //实际的大小,单位B

	public VoicePack(String name, String fileName, String downloadFileName, String description, double showSize,double realSize) {
		super();
		this.name = name;
		this.fileName = fileName;
		this.downloadFileName = downloadFileName;
		this.description = description;
		this.showSize = showSize;
		this.realSize = realSize;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}	

	public String getDownloadFileName() {
		return downloadFileName;
	}

	public void setDownloadFileName(String downloadFileName) {
		this.downloadFileName = downloadFileName;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public double getShowSize() {
		return showSize;
	}

	public void setShowSize(float showSize) {
		this.showSize = showSize;
	}

	public double getRealSize() {
		return realSize;
	}

	public void setRealSize(double realSize) {
		this.realSize = realSize;
	}
	
	
}
